package com.fingersoft.feature.appwidget

import com.fingersoft.business.appwidget.IAppWidgetContext
import com.fingersoft.im.api.UserAgent
import com.fingersoft.im.utils.AppUtils
import com.fingersoft.im.utils.JSONUtils

class SealAppWidgetContext : IAppWidgetContext {
    override fun getEmpInfo(): String? {
        return JSONUtils.toJsonString(UserAgent(AppUtils.getTokenInfo().userToken, AppUtils.getTokenInfo().did))
    }

    override fun getUserToken(): String? {
        return AppUtils.getTokenInfo().userToken
    }

    override fun makeApiUrl(path: String): String? {
        return AppUtils.getApiUrl(path, AppUtils.J_ECODE)
    }

    override fun triggerWorkModuleUpdate() {

    }
}
